<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Document</title>
        <script src="./vue.js"></script>
    </head>
    <style>

    </style>
    <body>
        <div id="app">
            <cpn>
                <span slot="center">标题</span>
            </cpn>
            <hr>
            <cpn></cpn>
            <hr>
            <cpn><button slot="left">返回</button></cpn>
        </div>
    </body>
    <template id="cpnC">
        <div>
            <slot name="left"><span>左边</span></slot>
            <slot name="center"><span>中间</span></slot>
            <slot name="right"><span>右边</span></slot>
        </div>
    </template>
    <script>
        let app = new Vue({
            el:"#app",
            data:{
                msg:"你好啊"
                 

            },
            components: {
                cpn:{
                    template:"#cpnC"
                }
            }
        })
    </script>
</html> 